﻿<Window x:Class="WpfHardCodedStringsFinder.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Search hard-coded string window" Height="400" Width="550">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="28"/>
            <RowDefinition />
            <RowDefinition Height="26"/>
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0"  Orientation="Horizontal">
            <TextBlock x:Name="txtFileToSearch" Text="File to search:" VerticalAlignment="Center" Margin="2,0,0,0"/>
            <TextBox x:Name="txtFile" Width="260" Height="23" HorizontalAlignment="Center" Text="{Binding Path=FilesToSearch,Mode=TwoWay}"
                     DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}" Margin="2,0,0,0"/>
            <Button x:Name="btnSearch" Content="Search" Click="btnSearch_Click" Margin="2,0,0,0"/>
        </StackPanel>
        <ListBox x:Name="lstStrings" ItemsSource="{Binding}" Grid.Row="1">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel>
                        <TextBlock Text="{Binding FileName}"/>
                        <TextBlock Text="{Binding BeginIndex}"/>
                        <TextBlock Text="{Binding Value}"/>
                    </StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>

        <Button x:Name="btnBeginProcess" Content="Begin process" Click="btnBeginProcess_Click" Grid.Row="2"/>
    </Grid>
</Window>
